-
Notifications
You must be signed in to change notification settings - Fork 5
Add a test that ensures correct BDF assignment #68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
phip1611
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally great work! Left a few remarks
b23fb51 to
4aac2f1
Compare
|
This is great work, can we also add 2 hotplug devices:
|
hertrste
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We well written test case 👍
phip1611
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the direction into that we are going here - good work! I left a few remarks
8089e2d to
9b27e1b
Compare
phip1611
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but I left a few remarks. I'm already approving.
|
You need to rebase your PR. |
240f603 to
8654c40
Compare
|
I just added negative tests for:
Both are expected to be blocked and errrored upon by libvirt. |
|
Great work! |
fd15760 to
d955b3c
Compare
5fe94a9 to
2c91b5d
Compare
phip1611
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome 🔥
c5ea19f to
7783a75
Compare
We need to specify slot IDs in the XML from which the VM config for CHV is created. This is in preparation for testing BDF fixing. Signed-off-by: Pascal Scholz <[email protected]> On-behalf-of: SAP [email protected]
When evaluating PCI BDF assignment we need a way to query these information from a test VM. This commit adds a handy way to obtain all BDFs with their assigned devices. Signed-off-by: Pascal Scholz <[email protected]> On-behalf-of: SAP [email protected]
The added tests checks that libvirt and CHV assigned and propagate PCI BDF correctly to the guest's PCI devices. It furthermore ensures, that these assignment stay valid even after live migration. Signed-off-by: Pascal Scholz <[email protected]> On-behalf-of: SAP [email protected]
We test that a VM, after recreation, assignes the same BDFs to it devices, even if we transiently remove a device before shutting the VM down. Signed-off-by: Pascal Scholz <[email protected]> On-behalf-of: SAP [email protected]
We test that the persistent config stores the correct BDF. Signed-off-by: Pascal Scholz <[email protected]> On-behalf-of: SAP [email protected]
We need to test that an invalid BDF results in an error from libvirt and does not crash CHV. Signed-off-by: Pascal Scholz <[email protected]> On-behalf-of: SAP [email protected]
We need a negative test that shows, that adding a function ID when entering a BDF result in libvirt generating a failure and CHV not crashing. Signed-off-by: Pascal Scholz <[email protected]> On-behalf-of: SAP [email protected]
This test adds checks for verifying correct BDF assignment through libvirt and that CHV respects those assignments, even after live migration. Moreover, this test ensures that BDFs can be freed and reused when de-/attaching devices (might be more of a theoretical feature?).
For further details, see the test description.
Related to https://github.com/cobaltcore-dev/cobaltcore/issues/287.